<?php
$sh = scws_open();
scws_set_charset($sh, 'utf8');
scws_set_dict($sh, './etc/dict.utf8.xdb');
scws_set_rule($sh, './etc/rules.utf8.ini');
$text = "我是一个中国人，我是一个中国人，我会C++语言，我也有很多T恤衣服";
scws_send_text($sh, $text);
//获取权重较高的10个词
$top = scws_get_tops($sh, 10 ,'n,special');
scws_open($sh);

echo "<pre>";
print_r($top);
echo "</pre>";
?>
